import pydirectinput as pdi
import keyboard
total=0
def openbox(a):
   global total
   print(f"{a}openbox{total}")
   total+=1

def repairClick(a):
   global total
   print(f"{a}click{total}")
   total+=1

def blank(a):
   global total
   print(f"{a}click{total}")

pdi.keyDown("ctrl")
keyboard.on_press_key("8",callback=openbox)

keyboard.on_press_key("7",callback=repairClick)
print("1.按ctrl+f8开始开盒子")
print("2.按ctrl+f7鼠标连点")
keyboard.wait("ctrl+8,ctrl+7")


